home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / comm / news / slrn-bin.lha / slrn / doc / tm / slrnfuns / header.tm < prev    next >
Text File  |  1999-04-27  |  10KB  |  308 lines

  1. \function{collapse_thread}
  2. \synopsis{-}
  3. \usage{Void collapse_thread ()}
  4. \description
  5.    This function may be used to collapse the current thread.
  6. \seealso{uncollapse_thread, collapse_threads, is_thread_collapsed}
  7. \done
  8.  
  9. \function{collapse_threads}
  10. \synopsis{-}
  11. \usage{Void collapse_threads ()}
  12. \description
  13.    This function will collapse all threads in the current newsgroup.
  14. \seealso{uncollapse_threads}
  15. \done
  16.  
  17. \function{extract_article_header}
  18. \synopsis{-}
  19. \usage{String extract_article_header (String h)}
  20. \description
  21.    This function returns the article header line specified by the
  22.    header keyword \var{h}.  If the header does not exist, it returns the
  23.    empty string.
  24. \seealso{is_article_visible}
  25. \done
  26.  
  27. \function{get_grouplens_score}
  28. \synopsis{-}
  29. \usage{Integer get_grouplens_score ()}
  30. \description
  31.    This function returns the grouplens score of the current header.
  32.    If the header has no grouplens score, or if grouplens support has
  33.    not been enabled, 0 will be returned.
  34. \seealso{}
  35. \done
  36.  
  37. \function{get_header_flags}
  38. \synopsis{-}
  39. \usage{Integer get_header_flags ()}
  40. \description
  41.    This functions returns the flags for the current header.  This
  42.    integer is a bitmapped value whose bits are defined by the following
  43.    constants:
  44. #v+
  45.       HEADER_READ : set if header is marked as read
  46.       HEADER_TAGGED : set if header has `*' tag
  47.       HEADER_HIGH_SCORE : set if header has high score
  48.       HEADER_LOW_SCORE : set if header has low score
  49. #v-
  50. \seealso{set_header_flags}
  51. \done
  52.  
  53. \function{get_header_score}
  54. \synopsis{-}
  55. \usage{Integer get_header_score ()}
  56. \description
  57.    This functions returns the score for the current header.
  58. \seealso{set_header_score}
  59. \done
  60.  
  61. \function{get_header_tag_number}
  62. \synopsis{-}
  63. \usage{Integer get_header_tag_number ()}
  64. \description
  65.    This function returns the value of the numerical tag associated
  66.    with the current header.  If the header has no numerical tag, zero
  67.    is returned.
  68. \seealso{}
  69. \done
  70.  
  71. \function{goto_num_tagged_header}
  72. \synopsis{-}
  73. \usage{Integer goto_num_tagged_header (Integer n)}
  74. \description
  75.    This function causes the header with numerical tag \var{n} to become the
  76.    current header.  It returns 1 upon success or 0 upon failure.
  77. \seealso{header_down, get_header_flags, call}
  78. \done
  79.  
  80. \function{header_down}
  81. \synopsis{-}
  82. \usage{Integer header_down (Integer n)}
  83. \description
  84.    The function moves the current position down \var{n} headers.  It
  85.    returns the number that was actually moved.
  86. \seealso{header_up}
  87. \done
  88.  
  89. \function{header_next_unread}
  90. \synopsis{-}
  91. \usage{Intger header_next_unread ()}
  92. \description
  93.    Goto next unread header.  The function returns one upon success or
  94.    zero upon failure.
  95. \seealso{header_down}
  96. \done
  97.  
  98. \function{header_up}
  99. \synopsis{-}
  100. \usage{header_up ()}
  101. \description
  102.    The function moves the current position up \var{n} headers.  It
  103.    returns the number that was actually moved.
  104. \seealso{header_down}
  105. \done
  106.  
  107. \function{is_thread_collapsed}
  108. \synopsis{-}
  109. \usage{Integer is_thread_collapsed ()}
  110. \description
  111.    If the current header is the start of a collapsed thread, this
  112.    function will return a non-zero value.  If the thread is expanded,
  113.    zero will be returned.
  114. \seealso{collapse_thread}
  115. \done
  116.  
  117. \function{locate_header_by_msgid}
  118. \synopsis{Goto a header of a specified message-id}
  119. \usage{Int_Type locate_header_by_msgid (String_Type msgid, Int_Type qs)}
  120. \description
  121.    The \var{locate_header_by_msgid} function may be used to set the
  122.    current header to one whose message-id is given by \var{msgid}.  If
  123.    the second parameter \var{qs} is non-zero, then the header will be
  124.    retrieved from the server if it is not in the current list of
  125.    headers.  The function returns \var{1} if an appropriate header was
  126.    found, or \var{0} otherwise.
  127. \example
  128.    One possible use of this function is to mark the current position
  129.    in the header list and return to that position later, e.g.,
  130. #v+
  131.        % Save the current position
  132.        variable msgid = extract_article_header ("Message-Id");
  133.           .
  134.           .
  135.        % Return to previous position.
  136.        () = locate_header_by_msgid (msgid);
  137. #v-
  138. \done
  139.  
  140. \function{next_tagged_header}
  141. \synopsis{-}
  142. \usage{Integer next_tagged_header ()}
  143. \description
  144.    This function moves the current header position to the next \exmp{*}
  145.    tagged header.  It returns non-zero upon success or zero upon
  146.    failure.
  147. \seealso{prev_tagged_header, goto_num_tagged_header, header_up, header_down}
  148. \done
  149.  
  150. \function{prev_tagged_header}
  151. \synopsis{-}
  152. \usage{Integer prev_tagged_header ()}
  153. \description
  154.    This function moves the current header position to the previous `*'
  155.    tagged header.  It returns non-zero upon success or zero upon
  156.    failure.
  157. \seealso{next_tagged_header, goto_num_tagged_header, header_up, header_down}
  158. \done
  159.  
  160. \function{re_bsearch_author}
  161. \synopsis{-}
  162. \usage{Integer re_bsearch_author (String regexp)}
  163. \description
  164.    Search backward for header whose author matches regular expression
  165.    \var{regexp}. If successful, it returns 1 and the current header is set
  166.    to the matching header.  It returns 0 upon failure.
  167. \seealso{re_fsearch_author, re_fsearch_subject}
  168. \done
  169.  
  170. \function{re_bsearch_subject}
  171. \synopsis{-}
  172. \usage{Integer re_bsearch_subject (String regexp)}
  173. \description
  174.    Search backward for header whose subject matches regular expression
  175.    \var{regexp}. If successful, it returns 1 and the current header is set
  176.    to the matching header.  It returns 0 upon failure.
  177. \seealso{re_fsearch_author, re_bsearch_subject}
  178. \done
  179.  
  180. \function{re_fsearch_author}
  181. \synopsis{-}
  182. \usage{Integer re_bsearch_author (String regexp)}
  183. \description
  184.    Search forward for header whose author matches regular expression
  185.    \var{regexp}. If successful, it returns 1 and the current header is set
  186.    to the matching header.  It returns 0 upon failure.
  187. \seealso{re_bsearch_author, re_fsearch_subject}
  188. \done
  189.  
  190. \function{re_fsearch_subject}
  191. \synopsis{-}
  192. \usage{Integer re_fsearch_subject (String regexp)}
  193. \description
  194.    Search forward for header whose subject matches regular expression
  195.    \var{regexp}. If successful, it returns 1 and the current header is set
  196.    to the matching header.  It returns 0 upon failure.
  197. \seealso{re_fsearch_author, re_bsearch_subject}
  198. \done
  199.  
  200. \function{set_header_display_format}
  201. \synopsis{Set the nth header display format}
  202. \usage{Void set_header_display_format (Int_Type nth, String_Type fmt)}
  203. \description
  204.    The \var{set_header_display_format} function may be used to set the
  205.    \var{nth} header display format to \var{fmt}.  One may
  206.    interactively toggle between the formats via the
  207.    \var{toggle_header_formats} keybinding.
  208.    
  209.    The generic format specifier begins with the \exmp{%} character and must
  210.    be of the form:
  211. #v+
  212.         %[-][w]x
  213. #v-
  214.    where the brackets indicate optional items.  Here, \em{w} is a width
  215.    specifier consisting of one or more digits.  If the minus sign (-)
  216.    is present, the item will be right justified, otherwise it will be
  217.    left justified.  The item specifier \em{x} is required and, depending
  218.    on it value, has the following meaning:
  219. #v+
  220.          s : subject
  221.          S : score
  222.          r : author real name
  223.          f : from header
  224.          G : Group lens score
  225.          l : Number of lines
  226.          n : server number
  227.          d : date
  228.          t : thread tree
  229.          F : flags (read/unread, `*' and `#' tags, header number)
  230.          % : percent character
  231.          g : goto a specified column
  232. #v-
  233.    Thus, \exmp{"%F%-5l:%t%s"} indicates that the header window will contain
  234.    the, in order: the flags, the number of lines the article contains
  235.    right justified in a 5 character field, a `:', the tree, and the
  236.    subject.
  237.    
  238.    The \var{g} format specifier must be preceeded by a number that
  239.    indicates the next write should take place at the specified column.
  240.    If the column number is negative, then the column is interpreted as
  241.    an offset from the right side of the display.  For example,
  242.    \exmp{%-24g%f} indicates that then \em{From} header is to
  243.    be written out 24 columns from the right edge of the window.
  244. \seealso{set_visible_headers}
  245. \done
  246.  
  247. \function{set_header_flags}
  248. \synopsis{-}
  249. \usage{Void set_header_flags (Integer flags)}
  250. \description
  251.    This fu